import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    /*新增口罩生产设备*/
     insertkzMachine(data) {
        return service({
            url: `/adscm/kz/kzMachine/insert`,
            method: 'post',
            data
        })
    },
    /*修改口罩生产设备*/
     updatekzMachine(data) {
        return service({
            url: `/adscm/kz/kzMachine/update`,
            method: 'post',
            data
        })
    },
    /* 分页查询设备信息 */
     getkzMachine(data) {
        return service({
            url: `/adscm/kz/kzMachine/select`,
            method: 'post',
            data
        })
    },
    /* 根据二维码查询设备信息 */
     getkzMachineByCode(data) {
        return service({
            url: `/adscm/kz/kzMachine/selectByCode`,
            method: 'get',
            params: data
        })
     },
     /* 新增物料入库信息 */
     insertkzMaterial(data) {
        return service({
            url: `/adscm/kz/kzMaterial/insert`,
            method: 'post',
            data
        })
     },
     /* 修改物料入库信息 */
     updatekzMaterial(data) {
        return service({
            url: `/adscm/kz/kzMaterial/update`,
            method: 'post',
            data
        })
     },
     /* 分页查询 */
     getkzMaterial(data) {
        return service({
            url: `/adscm/kz/kzMaterial/select`,
            method: 'post',
            data
        })
     },
     /* 二维码查询入库信息 */
     getkzMaterialByCode(data) {
        return service({
            url: `/adscm/kz/kzMaterial/selectByCode`,
            method: 'get',
            params: data
        })
     },
     /* 新增出库信息 */
     insertkzMaterialDetail(data) {
        return service({
            url: `/adscm/kz/kzMaterialDetail/insert`,
            method: 'post',
            data
        })
     },
          /* 修改出库信息 */
     updatekzMaterialDetail(data) {
        return service({
            url: `/adscm/kz/kzMaterialDetail/update`,
            method: 'post',
            data
        })
     },
     getkzMaterialDetailByPid(data) {
        return service({
            url: `/adscm/kz/kzMaterialDetail/selectByPid`,
            method: 'post',
            data
        })
     },
     /* 分页条件查询工作记录内容 */
     selectRecordPageByCondition(data) {
        return service({
            url: `/adscm/operation/mask/maskWorkRecord/selectRecordPageByCondition`,
            method: 'post',
            data
        })
     },
     /* 查询某个日期某个机床的操作者工作记录内容 */
     getOperatorTabaleData(macId,date) {
        return service({
            url: `/adscm/operation/mask/maskEmpWork/selectWork/${macId}/${date}`,
            method: 'get',
        })
     },
     getMaxCode() {
        return service({
            url: `/adscm/kz/kzMaterialDetail/getMaxCode`,
            method: 'get',
        })
     },

     getgxReportForm(data) {
        return service({
            url: `/adscm/operation/mask/maskWorkRecord/gxReportForm`,
            method: 'get',
            params: data
        })
     },
     printWorkQrCode(recordId) {
           /**打印工作记录：合格品、返工品的二维码*/
           return service({
               url: `/adscm/operation/mask/maskWorkRecord/printWorkQrCode/${recordId}`,
               method: 'get'
           })
     },
     // 修改记录/adscm/operation/mask/maskWorkRecord/update
     updateMaskWorkRecord(data) {
        return service({
            url: `/adscm/operation/mask/maskWorkRecord/update`,
            method: 'post',
            data
        })
     },
     deleteMaskWorkRecord(id) {
        return service({
            url: `/adscm/operation/mask/maskWorkRecord/deleteById/${id}`,
            method: 'get'
        })
     }
}
